import { useState } from "react";
const useClass = () => {
    const [isActive, setIsActive] = useState(false);
    const handleImg = (e) => {
        e.stopPropagation();
        setIsActive(true);
    }
    const handleBox = () => setIsActive(false);
    const imgClass = isActive ? 'active' : '';
    const boxClass = isActive ? 'box' : 'box boxActive';

    return { handleImg, handleBox, imgClass, boxClass }
}
export default useClass;